package com.mostromas.ess.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mostromas.ess.entities.ProductSizeType;
import com.mostromas.ess.product.mapper.ProductSizeTypeMapper;
import com.mostromas.ess.product.service.IProductSizeTypeService;
import com.mostromas.ess.util.base.Result;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductSizeTypeServiceIMpl extends ServiceImpl<ProductSizeTypeMapper, ProductSizeType> implements IProductSizeTypeService {
    @Override
    public Result selectAll() {
        QueryWrapper<ProductSizeType> wrapper = new QueryWrapper<>();
        wrapper.orderByAsc("sort");
        List<ProductSizeType> data = baseMapper.selectList(wrapper);
        return Result.ok(data);
    }
}
